set(INCLUDES
   AppDialog.hxx
   AppDialogSetFactory.hxx
   AppDialogSet.hxx
   BaseCreator.hxx
   BaseSubscription.hxx
   BaseUsage.hxx
   CertMessage.hxx
   ChallengeInfo.hxx
   ClientAuthExtension.hxx
   ClientAuthManager.hxx
   ClientInviteSession.hxx
   ClientOutOfDialogReq.hxx
   ClientPagerMessage.hxx
   ClientPublication.hxx
   ClientRegistration.hxx
   ClientSubscriptionFunctor.hxx
   ClientSubscription.hxx
   ContactInstanceRecord.hxx
   DefaultServerReferHandler.hxx
   DestroyUsage.hxx
   DialogEventHandler.hxx
   DialogEventInfo.hxx
   DialogEventStateManager.hxx
   Dialog.hxx
   DialogId.hxx
   DialogSetHandler.hxx
   DialogSet.hxx
   DialogSetId.hxx
   DialogUsage.hxx
   DialogUsageManager.hxx
   DumCommand.hxx
   DumDecrypted.hxx
   DumException.hxx
   DumFeatureChain.hxx
   DumFeature.hxx
   DumFeatureMessage.hxx
   DumHelper.hxx
   DumProcessHandler.hxx
   DumShutdownHandler.hxx
   DumThread.hxx
   DumTimeout.hxx
   EncryptionRequest.hxx
   EventDispatcher.hxx
   ExternalMessageBase.hxx
   ExternalMessageHandler.hxx
   ExternalTimer.hxx
   Handled.hxx
   HandleException.hxx
   Handle.hxx
   HandleManager.hxx
   Handles.hxx
   HttpGetMessage.hxx
   HttpProvider.hxx
   IdentityHandler.hxx
   InMemoryRegistrationDatabase.hxx
   InMemorySyncPubDb.hxx
   InMemorySyncRegDb.hxx
   InviteDialogs.hxx
   InviteSessionCreator.hxx
   InviteSessionHandler.hxx
   InviteSession.hxx
   KeepAliveManager.hxx
   KeepAliveTimeout.hxx
   MasterProfile.hxx
   MergedRequestKey.hxx
   MergedRequestRemovalCommand.hxx
   NetworkAssociation.hxx
   NonDialogUsage.hxx
   OutgoingEvent.hxx
   OutOfDialogHandler.hxx
   OutOfDialogReqCreator.hxx
   PagerMessageCreator.hxx
   PagerMessageHandler.hxx
   Postable.hxx
   Profile.hxx
   PublicationCreator.hxx
   PublicationHandler.hxx
   PublicationPersistenceManager.hxx
   RADIUSServerAuthManager.hxx
   RedirectHandler.hxx
   RedirectManager.hxx
   RefCountedDestroyer.hxx
   RegistrationCreator.hxx
   RegistrationHandler.hxx
   RegistrationPersistenceManager.hxx
   RemoteCertStore.hxx
   RequestValidationHandler.hxx
   ServerAuthManager.hxx
   ServerInviteSession.hxx
   ServerOutOfDialogReq.hxx
   ServerPagerMessage.hxx
   ServerPublication.hxx
   ServerRegistration.hxx
   ServerSubscriptionFunctor.hxx
   ServerSubscription.hxx
   ssl/EncryptionManager.hxx
   SubscriptionCreator.hxx
   SubscriptionHandler.hxx
   SubscriptionPersistenceManager.hxx
   SubscriptionState.hxx
   TargetCommand.hxx
   TlsPeerAuthManager.hxx
   TlsPeerIdentityInfoMessage.hxx
   WsCookieAuthManager.hxx
   UsageUseException.hxx
   UserAuthInfo.hxx
   UserProfile.hxx
)

add_library(dum
   AppDialog.cxx
   AppDialogSet.cxx
   AppDialogSetFactory.cxx
   BaseCreator.cxx
   BaseSubscription.cxx
   BaseUsage.cxx
   CertMessage.cxx
   ChallengeInfo.cxx
   ClientAuthExtension.cxx
   ClientAuthManager.cxx
   ClientInviteSession.cxx
   ClientOutOfDialogReq.cxx
   ClientPagerMessage.cxx
   ClientPublication.cxx
   ClientRegistration.cxx
   ClientSubscription.cxx
   ContactInstanceRecord.cxx
   DefaultServerReferHandler.cxx
   DestroyUsage.cxx
   Dialog.cxx
   DialogEventInfo.cxx
   DialogEventStateManager.cxx
   DialogId.cxx
   DialogSet.cxx
   DialogSetId.cxx
   DialogUsage.cxx
   DialogUsageManager.cxx
   DumDecrypted.cxx
   DumFeature.cxx
   DumFeatureChain.cxx
   DumFeatureMessage.cxx
   DumHelper.cxx
   DumProcessHandler.cxx
   DumThread.cxx
   DumTimeout.cxx
   EncryptionRequest.cxx
   Handle.cxx
   HandleException.cxx
   HandleManager.cxx
   Handled.cxx
   HttpGetMessage.cxx
   HttpProvider.cxx
   IdentityHandler.cxx
   InMemoryRegistrationDatabase.cxx
   InMemorySyncPubDb.cxx
   InMemorySyncRegDb.cxx
   InviteSession.cxx
   InviteSessionCreator.cxx
   InviteSessionHandler.cxx
   KeepAliveManager.cxx
   KeepAliveTimeout.cxx
   MasterProfile.cxx
   MergedRequestKey.cxx
   MergedRequestRemovalCommand.cxx
   NetworkAssociation.cxx
   NonDialogUsage.cxx
   OutOfDialogReqCreator.cxx
   OutgoingEvent.cxx
   PagerMessageCreator.cxx
   Profile.cxx
   PublicationCreator.cxx
   RADIUSServerAuthManager.cxx
   RedirectManager.cxx
   RegistrationCreator.cxx
   RegistrationHandler.cxx
   ServerAuthManager.cxx
   ServerInviteSession.cxx
   ServerOutOfDialogReq.cxx
   ServerPagerMessage.cxx
   ServerPublication.cxx
   ServerRegistration.cxx
   ServerSubscription.cxx
   SubscriptionCreator.cxx
   SubscriptionHandler.cxx
   SubscriptionState.cxx
   TargetCommand.cxx
   TlsPeerAuthManager.cxx
   TlsPeerIdentityInfoMessage.cxx
   UserAuthInfo.cxx
   UserProfile.cxx
   WsCookieAuthManager.cxx

   ${INCLUDES}
)

target_add_conditional_sources(dum OPENSSL_FOUND
   ssl/EncryptionManager.cxx
)

target_include_directories(dum PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}>)
target_link_libraries(dum resip)
version_libname(dum)
set_target_properties(dum PROPERTIES FOLDER dum)

install(TARGETS dum DESTINATION ${CMAKE_INSTALL_LIBDIR})
install_and_preserve_hierarchy(${CMAKE_INSTALL_INCLUDEDIR}/resip/dum ${INCLUDES})

if(BUILD_TESTING)
    add_subdirectory(test)
endif()
